<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Flexbox 均分四份</title>
  <style>
    .container {
      display: flex;
    }

    .item {
      flex: 1 0 0;
      border: 1px solid #ddd;
      text-align: center;
      padding: 20px;
    }
  </style>
</head>

<body>
  <div class="container">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
    <div class="item">4</div
  </div>
</body>

</html>